package org.dtrd.modules.doctor.mapper;

import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.doctor.entity.po.DtrdEntRdDoctor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 医生表 Mapper 接口
 * </p>
 *
 * @author QR
 * @since 2021-11-30 15:09:18
 */
@Mapper
public interface DtrdEntRdDoctorMapper extends BaseMapper<DtrdEntRdDoctor> {

    /**
     * 根据患者ID查询关联的医生信息
     *
     * @param patientId
     * @return
     */
    DtrdEntRdDoctor getDoctorInfoByPatientId(@Param("patientId") Integer patientId);

    DtrdEntRdDoctor getDoctorByUnionidOpenId(@Param("unionid") String unionid, @Param("openid") String openId);

    DtrdEntRdDoctor getDoctorByQrcodeUrl(@Param("qrcodeUrl") String qrcodeUrl);

    DtrdEntRdDoctor getDoctorPoRecordByPhone(@Param("phone") String phone);

    /**
     * 查询医生列表
     *
     * @param orgCode
     * @param doctorsName
     * @param doctorsMobile
     * @return
     */
    List<DtrdEntRdDoctor> getDoctorList(@Param("orgCode") String orgCode, @Param("name") String doctorsName, @Param("phone") String doctorsMobile);

    List<DtrdEntRdDoctor> getDoctorInfoByDoctorIds(@Param("doctorIdList") List<Integer> doctorIdList);

    String getDoctorOrgCodeById(@Param("doctorId") Integer doctorId);
}
